#ifndef _FPDF_EMB_SELECT_H_
#define _FPDF_EMB_SELECT_H_

#ifdef __cplusplus
extern "C" {
#endif

/** @brief PDF page position handle. */
typedef void*	FPDFEMB_SELECTPOS;

/**
 * Function: FPDFEMB_SelectStart
 *			Start select.
 *
 * @param[in] page		Page handle.
 * @param[in] x			X position in PDF page coordination system.
 * @param[in] y			Y position in PDF page coordination system.
 * @param[out] selpos		Page Position.
 * @return Error code. FPDFERR_SUCCESS for success.
 */
FPDFEMB_RESULT FPDFEMB_SelectStart(FPDFEMB_PAGE page, int x, int y, FPDFEMB_SELECTPOS* selpos);

/**
 * Function: FPDFEMB_SelectMove
 *			Move.
 *
 * @param[in] page		Page handle.
 * @param[in] selpos		Page Position.
 * @param[in] x			X position in PDF page coordination system.
 * @param[in] y			Y position in PDF page coordination system.
 * @return Error code. FPDFERR_SUCCESS for success.
 */
FPDFEMB_RESULT FPDFEMB_SelectMove(FPDFEMB_PAGE page, FPDFEMB_SELECTPOS selpos, int x, int y);

/**
 * Function: FPDFEMB_SelectRelease
 *			After selecting, you should call FPDFEMB_SelectRelease to free resource.
 *
 * @param[in] page		Page handle.
 * @param[in] selpos		Page Position.
 * @param[in] x			X position in PDF page coordination system.
 * @param[in] y			Y position in PDF page coordination system.
 * @return Error code. FPDFERR_SUCCESS for success.
 */
FPDFEMB_RESULT FPDFEMB_SelectRelease(FPDFEMB_PAGE page, FPDFEMB_SELECTPOS selpos);

/**
 * Function: FPDFEMB_SelectCountRect
 *			Get selected rect number.
 *
 * @param[in] page		Page handle.
 * @param[in] selpos		Page Position.
 * @param[out] count		Selected rect number.
 * @return Error code. FPDFERR_SUCCESS for success.
 */
FPDFEMB_RESULT FPDFEMB_SelectCountRect(FPDFEMB_PAGE page, FPDFEMB_SELECTPOS selpos, int* count);

/**
 * Function: FPDFEMB_SelectGetRect
 *			Get a particular selected rectangle.
 *
 * @param[in] page		Page handle.
 * @param[in] selpos		Page Position.
 * @param[in] index		Zero-based index for the rectangle.
 * @param[out] rect		Pointer to a structure receiving the rectangle.
 * @return Error code. FPDFERR_SUCCESS for success.
 */
FPDFEMB_RESULT FPDFEMB_SelectGetRect(FPDFEMB_PAGE page, FPDFEMB_SELECTPOS selpos, 
									 int index, struct FPDFEMB_RECT *rect);

#ifdef __cplusplus
};
#endif

#endif // _FPDF_EMB_SELECT_H_
